﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="OrderCart_OrderPay" Title="Untitled Page" Codebehind="OrderPay.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script  type="text/javascript" src="../Include/JS/qq.js"></script>
<script  type="text/javascript">
function Mask()
{
    
    var div_back = document.getElementById("div_background");
    div_back.style.display = "block"; 
    var iframe_back = document.getElementById("iframe_back");
    iframe_back.style.display = "block";     
    var cart = document.getElementById("ShoppingCart");
    cart.style.display = "block";
    cart.style.position = "absolute";
    var bigImg = document.getElementById("Flag");
    var pleft = 0;
    var ptop = 0;
   
    var obj = bigImg.offsetParent;
 
    while(obj.tagName != "BODY")
    {
         pleft = pleft + obj.offsetLeft;
         ptop = ptop + obj.offsetTop;
         obj = obj.offsetParent;
    }
    ptop = ptop +50;
    cart.style.left = pleft +200+ "px";
    cart.style.top = ptop +"px";
    cart.style.width = 300 + "px";
    cart.style.backgroundColor  = "#ffffff";
}

function HidMask()
{
    var div_back = document.getElementById("div_background");
    div_back.style.display = "none"; 
    var iframe_back = document.getElementById("iframe_back");
    iframe_back.style.display = "none";   
    var cart = document.getElementById("ShoppingCart");
    cart.style.display = "none";   
    document.getElementById("btnNew").disabled=""; 
}
function SetAddress(data)
{    
    document.getElementById("ShoppingCart").innerHTML=data;
}
function ShowMast()
{
    Mask();
    SetAddress("数据上传中......<img src='../images/ajax-loader.gif'>");    
    document.getElementById("btnNew").disabled="disabled";
}
function CheckOrder()
{   ShowMast();
    <%= ClientScript.GetCallbackEventReference(this,"","ReceiveServerData","",false) %>
}
function ReceiveServerData(result)
{debugger;
    if(result.length>0)
    {
        var str=result.split("|");
        if(str[4].length>0)
        {
            alert(str[4]+str[5]);
            HidMask();
            return false;
        }
        else if(str[0].length>0)
        {
            alert(str[0]+str[1]);
            HidMask();
            return false;
        }
        else if(str[2].length>0)
        {
            if(!confirm(str[2]+str[3]))
            {
                window.location="OrderCart.aspx";
                return false;
            }
            else
            {
                document.getElementById("ctl00_ContentPlaceHolder1_LinkButton1").click();
            }
        }
        else 
        {
            document.getElementById("ctl00_ContentPlaceHolder1_LinkButton1").click();
        }
    }
    else
    {
        document.getElementById("ctl00_ContentPlaceHolder1_LinkButton1").click();
    }
    return true;
}
    </script>

    <div class="r_content">
        <div class="r_gouwu">
            <div class="r_gouwu_title">
                <h2>
                    我的订单</h2>
            </div>
            <h3>
                <a href="OrderCart.aspx">返回购物袋修改></a></h3>
            <div class="r_gouwu_list">
                <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                    <HeaderTemplate>
                        <table width="830px" border="0" cellspacing="1" cellpadding="0" bgcolor="#d88468">
                            <tr>
                                <td class="r_bgcolor" colspan="8" align="left">
                                    商品信息</td>
                            </tr>
                            <tr class="r_bgcolor3">
                                <td>
                                    商品编号</td>
                                <td>
                                    商品名称</td>
                                <td>
                                    颜色</td>
                                <td>
                                    尺码</td>
                                <td>
                                    单价</td>
                                <td>
                                    数量</td>
                                <td>
                                    重量</td>
                                <td>
                                    金额小计</td>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr class="r_bgcolor1">
                            <td>
                                <%# Eval("BPD_COMMCODE")%>
                            </td>
                            <td>
                                <%# Eval("BPD_CANAME")%>
                            </td>
                            <td>
                                <%# Eval("BPD_COMMCOLORMC")%>
                            </td>
                            <td>
                                <%# Eval("BPD_COMMSIZEMC")%>
                            </td>
                            <td>
                                <%# Eval("BPD_APRICE","{0:f}")%>
                            </td>
                            <td>
                                <%# Eval("BPD_QTY","{0:F0}")%>
                            </td>
                            <td>
                                <asp:Label ID="Lbl_Weight" runat="server" Text=' <%# Eval("BPD_WEIGHT","{0:F0}")%>'></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="Lbl_xj" runat="server" Text='<%# Eval("BPD_AAMT","{0:f}")%>'></asp:Label>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table></FooterTemplate>
                </asp:Repeater>
                <div class="r_gouwu_zj">
                    <table width="200px" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="r_bgcolor2">
                                累计金额：</td>
                            <td>
                                <asp:Label ID="lbl_Amt" runat="server" Text="Label"></asp:Label></td>
                        </tr>
                        <tr>
                            <td class="r_bgcolor2">
                                累计重量：</td>
                            <td>
                                <asp:Label ID="lbl_Sweight" runat="server" Text="Label"></asp:Label></td>
                        </tr>
                        <tr>
                            <td class="r_bgcolor2">
                                购物积分：</td>
                            <td>
                                <asp:Label ID="lbl_SBuyJF" runat="server" Text="Label"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="r_address_list" id="Flag">
                <table width="830px" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="r_bgcolor4" align="left">
                            送货信息</td>
                    </tr>
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#d88468">
                                <tr class="r_bgcolor3">
                                    <td>
                                        物流公司</td>
                                    <td>
                                        收货人姓名</td>
                                    <td>
                                        具体地址</td>
                                    <td>
                                        邮编</td>
                                    <td>
                                        固定电话</td>
                                    <td>
                                        手机</td>
                                </tr>
                                <tr class="r_bgcolor1">
                                    <td>
                                        <asp:Label ID="lbl_Deliver" runat="server" Text="Label"></asp:Label></td>
                                    <td>
                                        <asp:Label ID="Lbl_Recier" runat="server" Text="Label"></asp:Label></td>
                                    <td>
                                        <asp:Label ID="Lbl_Address" runat="server" Text="Label"></asp:Label></td>
                                    <td>
                                        <asp:Label ID="lbl_Post" runat="server" Text="Label"></asp:Label></td>
                                    <td>
                                        <asp:Label ID="lbl_Phone" runat="server" Text="Label"></asp:Label></td>
                                    <td>
                                        <asp:Label ID="lbl_Mobile" runat="server" Text="Label"></asp:Label></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="r_myorder">
                <h4>
                    支付信息</h4>
                <table width="40%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="200">
                            商品总金额：</td>
                        <td align="right">
                            <asp:Label ID="SP_P_Amt" runat="server" Text="Label"></asp:Label>
                            元


                        </td>
                    </tr>
                    <tr>
                        <td>
                            运费：</td>
                        <td align="right">
                            <asp:Label ID="SP_fare" runat="server" Text="Label"></asp:Label>元


                        </td>
                    </tr>
                    <tr>
                        <td>
                            待支付金额：</td>
                        <td align="right">
                            <asp:Label ID="SP_ShouldPay" runat="server" Text="Label"></asp:Label>元


                        </td>
                    </tr>
                    <tr>
                        <td>
                            账户余额支付：</td>
                        <td align="right">
                            <asp:Label ID="Sp_YuE" runat="server" Text="Label"></asp:Label>元</td>
                    </tr>
                    <tr id="tr_jf" runat="server">
                        <td>
                            账户余额支付：</td>
                        <td align="right">
                            <asp:Label ID="lbl_Sum_JF" runat="server" Text="Label"></asp:Label>积分</td>
                    </tr>
                    <tr>
                        <td>
                            剩余金额：</td>
                        <td align="right">
                            <asp:Label ID="lbl_FinalJE" runat="server" Text="Label"></asp:Label>元</td>
                    </tr>
                    <tr>
                        <td>
                            剩余金额支付方式：</td>
                        <td align="right">
                            <asp:Label ID="PayMethodMC" runat="server" Text="Label"></asp:Label><input id="Hid_PayMethodID"
                                type="hidden" runat="server" /></td>
                    </tr>
                </table>
            </div>
            <div class="clear">
            </div>
            <div class="r_gouwu_button1">
                <ul>
                    <li><a id="btnNew" href="javascript:" onclick="CheckOrder()" >提交生成订单</a>
                        <asp:LinkButton ID="LinkButton1" runat="server"  OnClick="Button1_Click" Width="1"></asp:LinkButton></li><li>
                            <a href="../Default.aspx">继续购物</a></li></ul>
            </div>
            <div class="clear">
            </div>
            <div class="r_top_title">
                <a href="#">
                    <img src="../images/top.gif" /></a></div>
        </div>
    </div>
    <div id="div_background" class="divbackground">
    </div>
    <iframe id="iframe_back" class="diviframe" frameborder="0"></iframe>
    <div id="ShoppingCart" style="z-index: 11; display: none">
    </div>
</asp:Content>
